<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv=Content-Type content="text/html;charset=utf-8" />
    <title>gupiaozixun--register</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="__INDEX__/base.css">
    <link rel="stylesheet" href="__INDEX__/screenStyle.css">
    <link href="__INDEX__/f2fa92106ac8fd3943536c740cd36f3a6cf07d.css" media="screen, projection" rel="stylesheet" type="text/css" charset="UTF-8">
    <script src="__JS__/jquery.min.js"></script>
</head>
<style>
    .container{margin: 0 auto;padding: 0;}
    .register_form{width:90%;border: 1px solid #ccc;margin: 0 auto;}
    .container form label{width: 45%;margin: 1% auto;margin-left: 20%;}   
    .container .gupiao_register{margin-right: 20%;}
    .register_form h2{padding: 1% 0;}

    .header_box{width: 90%;margin: 0 auto;min-height: 50px}
    .header_box a {float:right;color:#525252;display: inline-block;font-size: 20px;font-weight: 300}
    .foot_box{margin: 0 auto;width: 90%;min-height: 100px;margin-top: 30px}
    @media only screen and (max-device-width:480px) {
        .slide {
    top: 60% !important;
}
.container .gupiao_register{margin-right: 20%;}
    }

    @media only screen and (max-device-width: 768px){
    
     .container form label {margin-left: 0;}
    span {
        width: 100% !important;
        margin: 0 auto;
    }
    }

    </style>
<body>

<!-- 表单-->
<div class="container ">
    <div class="header">
        <div class="logo"><a href="{$url}/index/index/index"> <img src="__IMG__/lgo.png" alt=""> </a></div>
    </div>

    <div class="header_box" style=""><a href="{$url}/index/index/index">返回首页</a></div>

    <form  method="post" action="consult"  onsubmit="return numchk2()" class="register_form">
            <h2>股票咨询</h2>
            <label><input type="text"  placeholder="输入姓名" name="name2" id="name2" onblur="chk4()"></label><span  id="name2_span"></span><br/>
            <label><input type="text"  placeholder="身份证号码" name="card2" id="card_id" onblur="chk5()"></label><span  id="card2_id_span"></span><br/>
            <label><input type="text"  placeholder="手机号码" name="mobile2" id="mobile_2" onblur="chk6()"></label><span  id="mobile_2_span"></span><br/>
            <label><input placeholder="银行卡号" type="text" name="account2"  id="bark_card" onblur="chk7()"></label><span  id="bark_card_span"></span><br/>
            <label><input placeholder="开户银行" type="text"  name="accountbank2" id="bark" onblur="chk8()"></label><span  id="bark_span"></span><br/>
            <label><input placeholder="微信号" type="text"  name="wechat2" id="wechat2" onblur="chk10()"></label><span  id="wechat2_span"></span><br/>
            <label><input placeholder="注册金额（100万起，以万为单位）" type="text" onblur="chk9()" id="money" name="money"></label><span  id="money_span"></span><br/>
            <input class="gupiao_register" type="submit" value="注册">
    </form>


    <div class="foot_box" >
        <p>我们给该账户汇入一笔非常小的金额和备注信息，后续审核人员致电或微信联系您确认</p>

    </div>

</div>
  <!--右侧客服 -->
  <div class="slide">
        <ul class="icon">
          <!-- <li class="up" title="上一页"></li> -->
          
          <li class="tel"></li>
          <li class="wx" ></li>
          <li class="about"></li>
          <!-- <li class="down" title="下一页"></li> -->
        </ul>
        <ul class="info">
          <!-- <li class="qq">
            <p>在线沟通，请点我<a href="http://wpa.qq.com/msgrd?v=3&uin=123456789&site=qq&menu=yes" target="_blank">在线咨询</a></p>
          </li> -->
           
          <li class="tel">
            <p>咨询热线：<br>400-640-2898<br>
              <!-- 客服qq：<br>123456789 -->
            </p>
          </li>
          <li class="wx">
            <div class="img"><img src="__PUBLIC__/picture/weixin_1.png" /></div>
          </li>
          <li class="about">
                <p><a href="{$url}/index/about/about.html" target="_blank">关于我们</a></p>
         </li>
        </ul>
      </div>
      <!-- <div id="btn" class="index_cy"></div> -->
      
    
      <script src="__JS__/kefu.js"></script>
      <script>
        jQuery(window).ready(function () {
          $(function(){
            $('#ul-btn').mouseover(function(){
              $('.zixun').show();
            });
    
             $('#ul-btn').mouseleave(function(){
              $('.zixun').hide();
            });
          })
        }) 
        </script>
</body>
</html>
<script>

    function user_ajax(url,user_name,user_span) {
        var bool;
        $.ajax({
            url:url,
            data:{n:user_name},
            async:false,
            type:"post",
            success:function (msg) {
                if(msg.error == 0){
                    $(user_span).html(msg.msg);
                    $(user_span).css('color','green');
                    bool = true
                }else if(msg.error==1){
                    $(user_span).html(msg.msg);
                    $(user_span).css('color','red');
                    bool =false;
                }
            }
        })
        return bool;
    }




    var chk4 = function () {
        var name2 =  $('#name2').val();
        var reg = /^[\u4e00-\u9fa5]{2,5}$/;
        var bool;
        if(reg.test(name2)){
            var bool = user_ajax('./yz_name',name2,'#name2_span');
            return bool;
        }else{
            $('#name2_span').html('请输入2-5位中文');
            $('#name2_span').css('color','red');
            return false;
        }

    }


    var chk5 = function () {
        var card_id = $('#card_id').val();
        var reg = /(^\d{15}$)|(^\d{17}([0-9]|X)$)/;
        if(reg.test(card_id)){

            var bool =  user_ajax('./yz_card',card_id,'#card2_id_span');
            return bool;

        }else{
            $('#card2_id_span').html('请输入正确格式的身份证');
            $('#card2_id_span').css('color','red');
            return false;
        }
    }


    var chk6 = function () {
        var mobile_2 = $('#mobile_2').val();
        var reg = /^1[3|4|5|8][0-9]\d{4,8}$/;
        if(reg.test(mobile_2)){

            var bool = user_ajax('./yz_mobile',mobile_2,'#mobile_2_span');
            return bool;

        }else{
            $('#mobile_2_span').html('请输入正确的手机号');
            $('#mobile_2_span').css('color','red');
            return false;
        }
    }

    var chk7 = function () {
        var bark_card = $('#bark_card').val();
        var reg = /^[0-9]{16,19}$/
        if(reg.test(bark_card)){

            var bool=  user_ajax('./yz_bark',bark_card,'#bark_card_span');
//            alert("我们给该账户汇入一笔非常小的金额和备注信息，后续审核人员致电或微信联系您确认");
            return bool;

        }else{
            $('#bark_card_span').html('请输入正确的16-19位的银行卡号');
            $('#bark_card_span').css('color','red');
            return false;
        }
    }
    //    开户银行
    var  chk8 = function () {
        var bark = $('#bark').val();
        var reg = /^[\u4e00-\u9fa5]{4,10}$/;
        if (reg.test(bark)){
            $('#bark_span').html('可用');
            $('#bark_span').css('color','green');
            return true;
        }else{
            $('#bark_span').html('请输入正确的银行');
            $('#bark_span').css('color','red');
            return false;
        }
    }
    //  申请金额
    var chk9 = function () {
        var  money = $('#money').val();
        var reg =/^[1-9]{1}[0-9]{1,6}$/

        if(reg.test(money)){
            if(money<100){
                $('#money_span').html('金额不能少于100W');
                $('#money_span').css('color','red');
                return false;
            }else{
                $('#money_span').html('可用');
                $('#money_span').css('color','green');
                return true;
            }

        }else{
            $('#money_span').html('请输入正确的金额');
            $('#money_span').css('color','red');
            return false;
        }
    }
    //微信号
    var chk10 = function () {
        var wechat2 = $('#wechat2').val();
        var reg = /^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/
        if(reg.test(wechat2)){

            var bool =  user_ajax('./yz_wechat',wechat2,'#wechat2_span');
            return bool;


        }else{
            $('#wechat2_span').html('请填写正确的微信号');
            $('#wechat2_span').css('color','red');
            return false;
        }
    }

    var numchk2 = function () {



        if(chk4() && chk5() && chk6() && chk7() && chk8() && chk9() && chk10()){

            alert('后续审核人员致电或微信联系您');

            return true;

        }else{
            alert('请认真填写资料');
            return false;
        }

    }

</script>

